<% layout('/layouts/default.html', {title: '任务部署分发表管理', libs: ['dataGrid']}){ %>
<div class="main-content">
  <div class="box box-main">
    <div class="box-header">
      <#form:form id="searchForm" model="${feedbackList}" action="${ctx}/audit/taskReceive/feedbackListData" method="post" class="form-inline"
      data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
      <div style="float: right">
            <#form:hidden path="taskId" />
            <#form:hidden path="actionId" />
            <#form:hidden path="timeParam" value="${dcSupTaskAction.timeParam!}" />
        <div class="form-group">
          <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
          <button onclick="cz();" class="btn btn-default btn-sm">${text('重置')}</button>
        </div>
      </div>
    </#form:form>
  </div>
  <div style="color: red">&emsp;删除的表反馈表dc_sup_task_feedback</div>
  <div style="color: red">&emsp;数据删除无法恢复,谨慎操作</div>
    <div class="box-body">
      <table id="dataGrid"></table>
      <div id="dataGridPage"></div>
    </div>
  </div>
</div>
<% } %>
<script>
  //重置
  function cz(){
    searchForm.reset();
    $('#dataGrid').dataGrid('reloadGrid');
  }

  // 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
    sortableColumn: false, // 列表不允许排序
	columnModel: [
      {header:'${text("反馈开始时间")}', name:'feedbackStartTime', index:'b.task_content', width:150, align:"left"},
      {header:'${text("反馈结束时间")}', name:'feedbackEndTime', index:'b.task_content', width:150, align:"left"},
      {header:'${text("反馈时间")}', name:'feedbackTime', index:'b.task_content', width:150, align:"left"},
		{header:'${text("操作")}', name:'actions', width:200, align:"center",formatter: function(val, obj, row, act){
			var actions = [];
            actions.push('<a href="javascript:void(0);" onclick="showRecord(\''+row.id+'\');" class="btn btn-primary btn-xs" title="${text("修改反馈时间")}">修改反馈时间</a>&nbsp;');
            actions.push('<a href="${ctx}/audit/taskReceive/deleteFeedback?id='+row.id+'" class="btn btn-danger btn-xs btnList" title="${text("删除任务")}" data-confirm="${text("确认要彻底删除该任务吗？")}">删除</a>&nbsp;');
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});


  // 修改反馈时间
  function showRecord(targetId) {
    js.layer.open({
      type:2,
      title:'',
      area:['600px','400px'],
      scrollbar: true,
      shadeClose: false,
      content:"${ctx}/audit/taskReceive/feedbackForm?id="+targetId,
      btn:[],
      btn1:function (index,layero) {
      }
    });
  }
</script>